<?php


namespace app\common\gateway\data;

use GatewayWorker\Lib\Gateway;

class GroupSender implements Sender
{
    /**
     * @var string 推送客户端
     */
    protected $group;

    public function __construct($group)
    {
        $this->group = $group;
    }

    public function send(Data $data)
    {
        Gateway::sendToGroup($this->group, $data->getData());
    }
}
